﻿<Window x:Class="Reactor.MiniManager.Views.AdoptServiceDetailsDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:xc="clr-namespace:Reactor.MiniManager.Utility" 
        xc:DialogCloser.DialogResult="{Binding Path=DialogResult}"
        Title="" Height="265" Width="300">
    <Grid Margin="5">
        <GroupBox Header="Service to adopt" x:Name="SettingsGroupBox" Padding="10">
            <StackPanel>
                <ComboBox Grid.Column="1" Height="23" Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center" Width="170" 
                          ItemsSource="{Binding Packages}"
                          SelectedItem="{Binding SelectedPackage}"/>
                
                <!-- A separator between settings and buttons. -->
                <Line Margin="0,4" SnapsToDevicePixels="True"
                      Stroke="{Binding ElementName=SettingsGroupBox, Path=BorderBrush}"
                      Stretch="Fill" X1="0" X2="1" />

                <!-- The standard OK and Cancel Buttons. -->
                <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="10">
                    <StackPanel.Resources>
                        <Style TargetType="Button">
                            <Setter Property="Margin" Value="4" />
                            <Setter Property="Width" Value="60" />
                        </Style>
                    </StackPanel.Resources>
                    <Button HorizontalAlignment="Left" Command="{Binding Mode=OneTime, Path=AcceptCommand}">_OK</Button>
                    <Button HorizontalAlignment="Right" IsCancel="True" Command="{Binding Mode=OneTime, Path=CancelCommand}">_Cancel</Button>
                </StackPanel>
            </StackPanel>
        </GroupBox>
    </Grid>
</Window>
